#include<stdio.h>
#include<errno.h>
#include<string.h>

extern int errno;

int main()
{
	FILE * pf;
	int errnum;

	pf = fopen("xxx.txt","rb");
	if(pf==NULL)
	{
		errnum = errno;
		fprintf(stderr,"error:%d\n",errno);
		perror("perror error\n");
		fprintf(stderr,"open file error:%s\n",strerror(errnum));
	}else{
	fclose(pf);
	}
	return 0;

}
